import request from '@/utils/request'

const API = '/admin/hospital'

export default {
  getPageList(pageNum, pageSize, searchObj) {
    return request({
      url: `${API}/${pageNum}/${pageNum}`,
      method: 'get',
      params: searchObj
    })
  },
  getChildByParentId(pid) {
    return request({
      url: `/admin/cmn/getChildList/${pid}`,
      method: 'get'
    })
  },
  updateStatus(id,status) {
    return request({
      url: `/admin/hospital/${id}/${status}`,
      method: 'put'
    })
  },
  getHospById(id) {
    return request({
      url: `/admin/hospital/detail/${id}`,
      method: 'get'
    })
  }
}
